package DataBase.IDAOImpl;

import java.sql.Date;
import java.util.ArrayList;

import com.Protocal.User.User;

import Protocal.Notice.Notice;

public class Impl_Test {
	public static void main(String args[]){
		User user=new User();
		i_User_Impl iu=new i_User_Impl();
		
		user.setUserid("091250");
		user.setPassword("soft");
		user.setName("NJUSE");
		user.setSex(1);
		user.setStatus(2);
		user.setLevel(1);
		user.setEmail("@software.nju.edu.cn");
		user.setTel("1529838....");
		user.setDescription("Hello World.");
		
		//iu.addUser(user);
		//iu.deleteUserById("091250");
		//User user1=iu.getUserByName("ccn");
		//System.out.println("user1 name: "+user1.getPassword());
		//iu.updateUser(user);
		
		i_Notice_Impl in = new i_Notice_Impl();
		Notice notice = new Notice();
		
		notice.setNoticeid(1);
		notice.setTittle("aefewf");
		notice.setContent("ddfe");
		
		//in.addNotice(notice);
		//in.deleteByTitle("aefewf");
	//	in.deleteByTime(Date.valueOf("2011-05-26"));
		ArrayList<Notice> result = in.getByTime(Date.valueOf("2006-1-28"));
		System.out.println(result.size());
		//Notice result = in.getByTitle("fdfdsf");
		//System.out.println(result.getNoticeid());
	}

}
